<script type="text/javascript">
function writeHTMLasJS(){
document.write("<!DOCTYPE html>");
document.write("<html xmlns=\"http:\/\/www.w3.org\/1999\/html\">");
document.write("<head>");
document.write("	<meta charset=\"utf-8\">");
document.write("	<title>T&T Offer Patterns<\/title>");
document.write("	<script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/2.1.1\/jquery.min.js\"><\/script>");
document.write("	<link rel=\"stylesheet\" href=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jqueryui\/1.11.1\/themes\/smoothness\/jquery-ui.css\" \/>");
document.write("	<script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jqueryui\/1.11.1\/jquery-ui.min.js\"><\/script>");
document.write("	<script src=\"https:\/\/ttdev204.googlecode.com\/svn\/ttadminextend\/CodeHighlightEditArea\/editArea\/edit_area_full.js\"><\/script>");
document.write("");
document.write("<\/head>");
document.write("<body style=\"font-size: 12px;\">");
document.write("");
document.write("<form action=\"#\">");
document.write("");
document.write("	<fieldset>");
document.write("		<label for=\"ttOfferPatternSelect\">Select an offer pattern<\/label>");
document.write("		<select name=\"ttOfferPatternSelect\" id=\"ttOfferPatternSelect\">");
document.write("			<option value=\"_select_\" selected=\"selected\">Please select<\/option>");
document.write("			<option value=\"ftbProductPromoCarouselNoRHS\">FTB ProductPromoCarousel (no RHS info)<\/option>");
document.write("			<option value=\"ftbProductPromoCarouselWithRHS\">FTB ProductPromoCarousel (with RHS info)<\/option>");
document.write("			<!--");
document.write("");
document.write("			<option value=\"ftbGhostAccount\">FTB GhostAccount<\/option>");
document.write("			-->");
document.write("		<\/select>");
document.write("	<\/fieldset>");
document.write("");
document.write("");
document.write("	<fieldset class=\"ftbProductPromoCarouselNoRHSFS ttOfferPatternInputs\">");
document.write("		<label for=\"ftbProductPromoCarouselNoRHSFS_Image_URL\">Image URL<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselNoRHSFS_Image_URL\" placeholder=\"example: \/OLB\/A\/Content\/Images\/1242645340532-globe-icon.png\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselNoRHSFS_Image_ALT\">Image ALT<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselNoRHSFS_Image_ALT\" placeholder=\"example: Global promo\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselNoRHSFS_Title\">Title (H3 value, don't add tags)<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselNoRHSFS_Title\" placeholder=\"example: Personalise your debit card\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselNoRHSFS_MainCopy\">Main copy (HTML, use tags to make 2 paragraphs or add links, change\/remove\/add target to _blank)<\/label>");
document.write("		<textarea id=\"ftbProductPromoCarouselNoRHSFS_MainCopy\" placeholder='example: <p>Upload your favourite photo or choose from our extensive gallery. <a href=\"http:\/\/barclays.co.uk\/P1235761253\" target=\"_blank\" class=\"tt_cta\">Get card<\/a><\/p>'><\/textarea>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<input type=\"button\" value=\"Generate HTML\" class=\"btn\" \/>");
document.write("	<\/fieldset>");
document.write("");
document.write("	<fieldset class=\"ftbProductPromoCarouselWithRHSFS ttOfferPatternInputs\">");
document.write("		<label for=\"ftbProductPromoCarouselWithRHSFS_Image_URL\">Image URL<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselWithRHSFS_Image_URL\" placeholder=\"example: \/OLB\/A\/Content\/Images\/1242645340532-globe-icon.png\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselWithRHSFS_Image_ALT\">Image ALT<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselWithRHSFS_Image_ALT\" placeholder=\"example: Global promo\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselWithRHSFS_Title\">Title (H3 value, don't add tags)<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselWithRHSFS_Title\" placeholder=\"example: Tailor your account\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselWithRHSFS_RHSLine1\">RHS Line 1 (bigger size)<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselWithRHSFS_RHSLine1\" placeholder=\"example: &pound;10\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselWithRHSFS_RHSLine2\">RHS Line 2 (smaller size)<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbProductPromoCarouselWithRHSFS_RHSLine2\" placeholder=\"example: per month\" \/>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("");
document.write("		<label for=\"ftbProductPromoCarouselWithRHSFS_MainCopy\">Main copy (HTML, use tags to make 2 paragraphs or add links, change\/remove\/add target to _blank)<\/label>");
document.write("		<textarea id=\"ftbProductPromoCarouselWithRHSFS_MainCopy\" placeholder='example: <p>Upload your favourite photo or choose from our extensive gallery. <a href=\"http:\/\/barclays.co.uk\/P1235761253\" target=\"_blank\" class=\"tt_cta\">Get card<\/a><\/p>'><\/textarea>");
document.write("		<a href=\"#\" class=\"ttCopyFromExample\" title=\"Copy from example\">*<\/a>");
document.write("");
document.write("		<input type=\"button\" value=\"Generate HTML\" class=\"btn\" \/>");
document.write("	<\/fieldset>");
document.write("");
document.write("	<!--");
document.write("");
document.write("");
document.write("	<fieldset class=\"ftbGhostAccountFS ttOfferPatternInputs\">");
document.write("		<label for=\"ftbGhostAccountFS_Image_URL\">Image URL<\/label>");
document.write("		<input type=\"text\" value=\"\" id=\"ftbGhostAccountFS_Image_URL\" \/>");
document.write("");
document.write("		<input type=\"button\" value=\"Generate HTML\" class=\"btn\" \/>");
document.write("	<\/fieldset>");
document.write("	-->");
document.write("");
document.write("	<fieldset class=\"ttOfferPatternOutput\">");
document.write("		<label for=\"ttOfferPatternOutputHTML\" style=\"margin-top: 10px;\">Output HTML <span style=\"font-size:11px; display: block; margin-top: 10px; width: 170px;\">Modify the HTML if needed, then select all and copy.<\/span><\/label>");
document.write("		<textarea id=\"ttOfferPatternOutputHTML\" class=\"html\"><\/textarea>");
document.write("	<\/fieldset>");
document.write("");
document.write("<\/form>");
document.write("<style>");
document.write("	fieldset {");
document.write("		border: 0;");
document.write("	}");
document.write("	label {");
document.write("		display: block;");
document.write("		margin: 15px 0 0 0;");
document.write("		width: 213px;");
document.write("		float: left;");
document.write("		font-family: sans-serif;");
document.write("		font-size: 1em;");
document.write("		color: darkslateblue;");
document.write("	}");
document.write("	select {");
document.write("		width: 785px;");
document.write("		font-size: 12px;");
document.write("	}");
document.write("	.overflow {");
document.write("		height: 200px;");
document.write("	}");
document.write("");
document.write("	.ttCopyFromExample {");
document.write("		text-decoration: none;");
document.write("		color: grey;");
document.write("		font-size: 13px;");
document.write("		padding: 0 5px;");
document.write("		float: left;");
document.write("	}");
document.write("");
document.write("	.ttOfferPatternInputs, .ttOfferPatternOutput {");
document.write("		display: none;");
document.write("	}");
document.write("");
document.write("	.ttOfferPatternInputs label,");
document.write("	.ttOfferPatternOutput label{");
document.write("		clear: both;");
document.write("		float: left;");
document.write("		margin: 2px 10px 0 0;");
document.write("		width: 200px;");
document.write("	}");
document.write("");
document.write("	.ttOfferPatternInputs input,");
document.write("	.ttOfferPatternInputs textarea,");
document.write("	.ttOfferPatternOutput textarea{");
document.write("		float: left;");
document.write("		width: 780px;");
document.write("		padding: 5px 2px;");
document.write("		font-size: 1em;");
document.write("	}");
document.write("");
document.write("	.ttOfferPatternInputs .btn {");
document.write("		clear: both;");
document.write("		margin-top: 30px;");
document.write("		font-size: 12px;");
document.write("		width: auto;");
document.write("	}");
document.write("");
document.write("	.ttOfferPatternInputs textarea{");
document.write("		height: 100px;");
document.write("		font-size: 1em;");
document.write("		width: 782px;");
document.write("	}");
document.write("");
document.write("	.ttOfferPatternOutput{");
document.write("		position: relative;");
document.write("	}");
document.write("");
document.write("	.ttOfferPatternOutput #ttOfferPatternOutputHTML {");
document.write("		height: 490px;");
document.write("		overflow-x: scroll;");
document.write("		overflow-y: scroll;");
document.write("		word-wrap: normal;");
document.write("		width: 770px;");
document.write("		background-color: #fff;");
document.write("		border: 2px outset dodgerblue;");
document.write("	}");
document.write("");
document.write("<\/style>");
document.write("<script type=\"text\/javascript\">");
document.write("");
document.write("var editArea;");
document.write("console.log(opener);");
document.write("if (opener){");
document.write("	editArea=opener.editArea;");
document.write("}");
document.write("");
document.write("");
document.write("	$(function(){");
document.write("");
document.write("		$(\"#ttOfferPatternSelect\").selectmenu({");
document.write("			change: function( event, data ) {");
document.write("				$('.ttOfferPatternInputs').hide();");
document.write("				$('.ttOfferPatternOutput').hide();");
document.write("				$('#ttOfferPatternOutputHTML').html('');");
document.write("				$('#ttOfferPatternOutputHTML').attr('class','html');");
document.write("");
document.write("				if (data.item.value!=\"_select_\"){");
document.write("					$('.' + data.item.value + 'FS.ttOfferPatternInputs').show();");
document.write("				}");
document.write("			}");
document.write("		});");
document.write("");
document.write("		$(\"form\")[0].reset();");
document.write("");
document.write("		$('.ttOfferPatternInputs .ttCopyFromExample').click(function(e){");
document.write("			e.preventDefault();");
document.write("			var ttPlaceholderVal = $(this).prev('[placeholder]').attr('placeholder').replace('example: ','');");
document.write("			$(this).prev('[placeholder]').val(ttPlaceholderVal);");
document.write("			return false;");
document.write("		});");
document.write("");
document.write("		$('.ttOfferPatternInputs .btn').click(function(e){");
document.write("			var ttPatternSelected = $(this).closest('.ttOfferPatternInputs').attr('class').replace('FS ttOfferPatternInputs','');");
document.write("			var ttOutputHTML = '';");
document.write("");
document.write("			switch (ttPatternSelected) {");
document.write("				case 'ftbProductPromoCarouselNoRHS':");
document.write("");
document.write("					var ftbProductPromoCarouselNoRHSFS_Image_URL = $('#ftbProductPromoCarouselNoRHSFS_Image_URL').val(),");
document.write("						ftbProductPromoCarouselNoRHSFS_Image_ALT = $('#ftbProductPromoCarouselNoRHSFS_Image_ALT').val(),");
document.write("						ftbProductPromoCarouselNoRHSFS_Title = $('#ftbProductPromoCarouselNoRHSFS_Title').val().replace(\/£\/g,'&pound;'),");
document.write("						ftbProductPromoCarouselNoRHSFS_MainCopy = $('#ftbProductPromoCarouselNoRHSFS_MainCopy').val().replace(\/£\/g,'&pound;');");
document.write("");
document.write("					if (");
document.write("						ftbProductPromoCarouselNoRHSFS_Image_URL=='' ||");
document.write("						ftbProductPromoCarouselNoRHSFS_Image_ALT=='' ||");
document.write("						ftbProductPromoCarouselNoRHSFS_Title=='' ||");
document.write("						ftbProductPromoCarouselNoRHSFS_MainCopy==''");
document.write("					){");
document.write("						alert('Please provide information for all fields!');");
document.write("						break;");
document.write("					}else{");
document.write("						ttOutputHTML=\"\x3C!-- the ID should be unique, so it\'s formed dynamically from the mbox name, acc_type and acc_instance parameters\n needs to begin with the original mbox name, to match the base CSS file selectors! --\x3E\" +");
document.write("								\"\n\x3Cdiv id=\\"${mbox.name}_${mbox.acc_type}_${mbox.acc_instance}\\" class=\\"clearfix\\"\x3E\" +");
document.write("								\"\n\t\x3Cdiv class=\\"snippet\\"\x3E\" +");
document.write("								\"\n\t\t\x3Cul\x3E\" +");
document.write("								\"\n\t\t\t\x3Cli\x3E\" +");
document.write("								\"\n\t\t\t\t\x3Cimg src=\\"\"+ftbProductPromoCarouselNoRHSFS_Image_URL+\"\\" alt=\\"\"+ftbProductPromoCarouselNoRHSFS_Image_ALT+\"\\" height=\\"34\\" width=\\"34\\"\x3E\" +");
document.write("								\"\n\t\t\t\t\x3Ch3\x3E\"+ftbProductPromoCarouselNoRHSFS_Title+\"\x3C\x2Fh3\x3E\" +");
document.write("								\"\n\t\t\t\t\" +ftbProductPromoCarouselNoRHSFS_MainCopy+");
document.write("								\"\n\t\t\t\x3C\x2Fli\x3E\" +");
document.write("								\"\n\n\t\t\x3C\x2Ful\x3E\" +");
document.write("								\"\n\t\x3C\x2Fdiv\x3E\" +");
document.write("								\"\n\x3C\x2Fdiv\x3E\" +");
document.write("								\"\n\x3Cstyle type=\\"text\x2Fcss\\"\x3E\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet {\" +");
document.write("								\"\n\t\theight: auto;\" +");
document.write("								\"\n\t\tmin-height: 133px;\" +");
document.write("								\"\n\t}\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet h3 {\" +");
document.write("								\"\n\t\t float: left;\" +");
document.write("								\"\n\t\t min-height: 34px;\" +");
document.write("								\"\n\t\t width: 250px;\" +");
document.write("								\"\n\t\t line-height: 1.2;\" +");
document.write("								\"\n\t }\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet p {\" +");
document.write("								\"\n\t\t line-height: 1.6;\" +");
document.write("								\"\n\t\t clear: both;\" +");
document.write("								\"\n\t }\" +");
document.write("								\"\n\x3C\x2Fstyle\x3E\" +");
document.write("								\"\n\x3Cscript type=\\"text\x2Fjavascript\\"\x3E\" +");
document.write("								\"\n\t$(function() {\" +");
document.write("								\"\n\t\t\x2F\x2FTracking\" +");
document.write("								\"\n\n\t\t$(\'#tt${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} a.tt_cta\').live(\'mousedown\',function(e){\" +");
document.write("								\"\n\t\t\tvar $ttTagText1=$(this).text().replace(\x2F\\W+\x2Fg, \'\'); \x2F\x2Fthis could be further customized based on business requirements\" +");
document.write("								\"\n\t\t\ts.linkTrackVars=\'prop17,prop74,eVar44,events\';\" +");
document.write("								\"\n\t\t\ts.linkTrackEvents=\'event5\';\" +");
document.write("								\"\n\t\t\ts.prop17=s.pageName;\" +");
document.write("								\"\n\t\t\ts.prop74=$ttTagText1;\" +");
document.write("								\"\n\t\t\ts.eVar44=\'${campaign.id}:${campaign.recipe.id}:${campaign.recipe.trafficType}\';\" +");
document.write("								\"\n\t\t\ts.events=\'event5\';\" +");
document.write("								\"\n\t\t\ttt_Log(\'MainCTA_${mbox.acc_instance}\');\" +");
document.write("								\"\n\t\t\ts.tl(true, \'o\', \'TNT Clickthrough\');\" +");
document.write("								\"\n\t\t});\" +");
document.write("								\"\n\t});\" +");
document.write("								\"\n\x3C\x2Fscript\x3E\" +");
document.write("								\"\n\";");
document.write("");
document.write("						$('#ttOfferPatternOutputHTML').text(ttOutputHTML);");
document.write("						opener.EditArea_charmap.default_language.toLowerCase();");
document.write("						opener.parent.editAreaLoader.setSelectedText(editArea.id, ttOutputHTML);");
document.write("						range= opener.parent.editAreaLoader.getSelectionRange(editArea.id);");
document.write("						opener.parent.editAreaLoader.setSelectionRange(editArea.id, range[\"end\"], range[\"end\"]);");
document.write("						window.focus();");
document.write("");
document.write("						\/\/$('.ttOfferPatternOutput').show();");
document.write("					}");
document.write("					break;");
document.write("");
document.write("");
document.write("				case 'ftbProductPromoCarouselWithRHS':");
document.write("");
document.write("					var ftbProductPromoCarouselWithRHSFS_Image_URL = $('#ftbProductPromoCarouselWithRHSFS_Image_URL').val(),");
document.write("							ftbProductPromoCarouselWithRHSFS_Image_ALT = $('#ftbProductPromoCarouselWithRHSFS_Image_ALT').val(),");
document.write("							ftbProductPromoCarouselWithRHSFS_Title = $('#ftbProductPromoCarouselWithRHSFS_Title').val(),");
document.write("							ftbProductPromoCarouselWithRHSFS_RHSLine1 = $('#ftbProductPromoCarouselWithRHSFS_RHSLine1').val().replace(\/£\/g,'&pound;'),");
document.write("							ftbProductPromoCarouselWithRHSFS_RHSLine2 = $('#ftbProductPromoCarouselWithRHSFS_RHSLine2').val().replace(\/£\/g,'&pound;'),");
document.write("							ftbProductPromoCarouselWithRHSFS_MainCopy = $('#ftbProductPromoCarouselWithRHSFS_MainCopy').val().replace(\/£\/g,'&pound;');");
document.write("");
document.write("					if (");
document.write("							ftbProductPromoCarouselWithRHSFS_Image_URL=='' ||");
document.write("							ftbProductPromoCarouselWithRHSFS_Image_ALT=='' ||");
document.write("							ftbProductPromoCarouselWithRHSFS_Title=='' ||");
document.write("							ftbProductPromoCarouselWithRHSFS_MainCopy==''");
document.write("							){");
document.write("						alert('Please provide information for all fields!');");
document.write("						break;");
document.write("					}else{");
document.write("						ttOutputHTML=\"\x3C!-- the ID should be unique, so it\'s formed dynamically from the mbox name, acc_type and acc_instance parameters\n needs to begin with the original mbox name, to match the base CSS file selectors! --\x3E\" +");
document.write("								\"\n\x3Cdiv id=\\"${mbox.name}_${mbox.acc_type}_${mbox.acc_instance}\\" class=\\"clearfix\\"\x3E\" +");
document.write("								\"\n\t\x3Cdiv class=\\"snippet\\"\x3E\" +");
document.write("								\"\n\t\t\x3Cul\x3E\" +");
document.write("								\"\n\t\t\t\x3Cli\x3E\" +");
document.write("								\"\n\t\t\t\t\x3Cimg src=\\"\"+ftbProductPromoCarouselWithRHSFS_Image_URL+\"\\" alt=\\"\"+ftbProductPromoCarouselWithRHSFS_Image_ALT+\"\\" height=\\"34\\" width=\\"34\\"\x3E\" +");
document.write("								\"\n\t\t\t\t\x3Ch3\x3E\"+ftbProductPromoCarouselWithRHSFS_Title+\"\x3C\x2Fh3\x3E\" +");
document.write("								\"\n\t\t\t\t\x3Cdiv class=\\"ttProductPromoCarouselRHS\\"\x3E\" +");
document.write("								\"\n\t\t\t\t\t\x3Cdiv class=\\"ttProductPromoCarouselRHS_Line1\\"\x3E\" + ftbProductPromoCarouselWithRHSFS_RHSLine1 + \"\x3C\x2Fdiv\x3E\" +");
document.write("								\"\n\t\t\t\t\t\x3Cdiv class=\\"ttProductPromoCarouselRHS_Line2\\"\x3E\" + ftbProductPromoCarouselWithRHSFS_RHSLine2 + \"\x3C\x2Fdiv\x3E\" +");
document.write("								\"\n\t\t\t\t\x3C\x2Fdiv\x3E\" +");
document.write("								\"\n\t\t\t\t\" +ftbProductPromoCarouselWithRHSFS_MainCopy+");
document.write("								\"\n\t\t\t\x3C\x2Fli\x3E\" +");
document.write("								\"\n\n\t\t\x3C\x2Ful\x3E\" +");
document.write("								\"\n\t\x3C\x2Fdiv\x3E\" +");
document.write("								\"\n\x3C\x2Fdiv\x3E\" +");
document.write("								\"\n\x3Cstyle type=\\"text\x2Fcss\\"\x3E\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet {\" +");
document.write("								\"\n\t\theight: auto;\" +");
document.write("								\"\n\t\tposition: relative;\" +");
document.write("								\"\n\t\tmin-height: 133px;\" +");
document.write("								\"\n\t}\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet h3 {\" +");
document.write("								\"\n\t\t min-height: 34px;\" +");
document.write("								\"\n\t\t float: left;\" +");
document.write("								\"\n\t\t width: 115px;\" +");
document.write("								\"\n\t\t line-height: 1.2;\" +");
document.write("								\"\n\t }\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet p {\" +");
document.write("								\"\n\t\t clear: both;\" +");
document.write("								\"\n\t\t line-height: 1.6;\" +");
document.write("								\"\n\t }\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet .ttProductPromoCarouselRHS {\" +");
document.write("								\"\n\t\t position: absolute;\" +");
document.write("								\"\n\t\t right: 15px;\" +");
document.write("								\"\n\t\t top: 20px;\" +");
document.write("								\"\n\t }\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet .ttProductPromoCarouselRHS_Line1 {\" +");
document.write("								\"\n\t\t display: block;\" +");
document.write("								\"\n\t\t font-size: 1.8em;\" +");
document.write("								\"\n\t\t text-align: right;\" +");
document.write("								\"\n\t }\" +");
document.write("								\"\n\t#${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} .snippet .ttProductPromoCarouselRHS_Line2 {\" +");
document.write("								\"\n\t\t display: block;\" +");
document.write("								\"\n\t\t font-size: 1em;\" +");
document.write("								\"\n\t\t text-align: right;\" +");
document.write("								\"\n\t }\" +");
document.write("								\"\n\x3C\x2Fstyle\x3E\" +");
document.write("								\"\n\x3Cscript type=\\"text\x2Fjavascript\\"\x3E\" +");
document.write("								\"\n\t$(function() {\" +");
document.write("								\"\n\t\t\x2F\x2FTracking\" +");
document.write("								\"\n\n\t\t$(\'#tt${mbox.name}_${mbox.acc_type}_${mbox.acc_instance} a.tt_cta\').live(\'mousedown\',function(e){\" +");
document.write("								\"\n\t\t\tvar $ttTagText1=$(this).text().replace(\x2F\\W+\x2Fg, \'\'); \x2F\x2Fthis could be further customized based on business requirements\" +");
document.write("								\"\n\t\t\ts.linkTrackVars=\'prop17,prop74,eVar44,events\';\" +");
document.write("								\"\n\t\t\ts.linkTrackEvents=\'event5\';\" +");
document.write("								\"\n\t\t\ts.prop17=s.pageName;\" +");
document.write("								\"\n\t\t\ts.prop74=$ttTagText1;\" +");
document.write("								\"\n\t\t\ts.eVar44=\'${campaign.id}:${campaign.recipe.id}:${campaign.recipe.trafficType}\';\" +");
document.write("								\"\n\t\t\ts.events=\'event5\';\" +");
document.write("								\"\n\t\t\ttt_Log(\'MainCTA_${mbox.acc_instance}\');\" +");
document.write("								\"\n\t\t\ts.tl(true, \'o\', \'TNT Clickthrough\');\" +");
document.write("								\"\n\t\t});\" +");
document.write("								\"\n\t});\" +");
document.write("								\"\n\x3C\x2Fscript\x3E\" +");
document.write("								\"\n\";");
document.write("");
document.write("						$('#ttOfferPatternOutputHTML').text(ttOutputHTML);");
document.write("");
document.write("						$('.ttOfferPatternOutput').show();");
document.write("					}");
document.write("					break;");
document.write("");
document.write("				default:");
document.write("");
document.write("					break;");
document.write("			}");
document.write("");
document.write("			\/*");
document.write("");
document.write("			 \/\/ Highlight code");
document.write("");
document.write("			 $('#ttOfferPatternOutputHTML').each(function(i, block) {");
document.write("			 hljs.highlightBlock(block);");
document.write("			 });");
document.write("			 *\/");
document.write("		});");
document.write("	});");
document.write("<\/script>");
document.write("<\/body>");
document.write("<\/html>");
}
</script>

<!--
now place this function call at whatever point
it needs to write the markup on to the page: -->

<script type="text/javascript">
writeHTMLasJS();
</script>